Fix whitespace and remove useless code