Improve file/folder structure and clean up code