Fixed some dodgy hacks
Anal formatted all majority of the code.
Organised the project files.