Cleanup obsolete code