Another JS refactor -- created view