factoring out position object
refactor page
refactor code to encapsulate page logic