Little bit of house keeping.

Took a look through the code and while I was at it I cleaned it up a bit. I don't have an azure account to really test this out though. Started out with light changes so I hope I haven't messed anything up. Please take a look. I hope this helps.