cleanup and fix of minor errors

cleaned up formatting and corrected a few minor errors, using tab for formatting is problematic because each editor has tab size different