Remove obsolete code and renames to follow better conventions.