[ALOY-1148] Update model template code

Resolves https://jira.appcelerator.org/browse/ALOY-1148