Refactored page to import and use js.main

Refactoring.