Renamed some files and refactored some code.