Refactored a large amount of code into folders.