Restructure assign app js to better match data model CRM-12859