Remove obsolete code and comments