Routes controlpoints views js refactoring