working on refactoring pages
got refactored js page to render