Added helper methods to the Model class. Still need to be commented.