Code revision to Model.java