correctly initiate model from global var if it exists
pass jshint