added the possibility to add static methods to a model and had the hooks be part of the object to be able to use this to access variables