Added clone method to the model to make a deep copy. Not quite sure if it will work as it is not clear it will copy over the methods properly.