Fixed the poor formatting of a lot of the code