Fixing compile errors. Adding some whitespace formatting.