Removed legacy code, split up some more