updated documentation and changed order of class variables
converted Model class so all object variables (that are stored in the database) are contained in the publicly accessible data class variable which can be accessed via magic get and set methods. All other variables should be private or protected.
added documentation
simplified getDBObject method