Remove outdated code and add some version enums for safety