Remove obsolete code and modify whitespace