Crm 12887 JS tidy up