From http://stackoverflow.com/questions/11112608/angularjs-where-to-put-model-data-and-behaviour