Remove unnecessary whitespace and commented code