refactored simple_page.js