Cleaned up code to make it more readable
Recently read Code Complete and wanted to make the code nicer ..