Move all the code for 'model' into the model module

Remove $.extend hackery.
Merge pull request #26 from typesafehub/wip/havocp-cleanup-model-init

Move all the code for 'model' into the model module