Cleaned the code up

I cleaned up all of the code, by doing a reformat. I also restructured the classes/ packages to make it look more organised. I also fixed the reversed text because it didn't seem to work for me.

You can see all the changes in the commit logs.