Formatted code, updated whitespace bug