fix whitespace violations, remove unused code