Code refactoring to improve structure and localising files.