Cleaned up the code so it is all pretty like