Refactor the rest of the code to match the new model interface