Reorganise files
Move page functions to specific files
Fix bugs
Fix bugs