rearrange files and add a PageController class (draft)