fix require bug
refactor page rendering methods