Fix some compile time warnings

This should fix four compile time warnings. It also includes some whitespace cleanup to make it more readable.