Implemented the rest of the Model code