  This report focuses on improving the internal structure of the Distributed
Modular Audio recognition Framework (DMARF) and the General Intensional
Programming System (GIPSY) case studies without affecting their original
behavior. At first, the general principles, and the working of DMARF and GIPSY
are understood by mainly stressing on the architecture of the systems by
looking at their frameworks and running them in the Eclipse environment. To
improve the quality of the structure of the code, a furtherance of
understanding of the architecture of the case studies and this is achieved by
analyzing the design patterns present in the code. The improvement is done by
the identification and removal of code smells in the code of the case studies.
Code smells are identified by analyzing the source code by using Logiscope and
JDeodorant. Some refactoring techniques are suggested, out of which the best
suited ones are implemented to improve the code. Finally, Test cases are
implemented to check if the behavior of the code has changed or not.
