Code clean up

Making some of the code look a little neater.