Fix whitespace errors and compile errors