Refactored some code and directories.