Added instance hooks to Model generation

... functionality