Removed most legacy code.