moving towards one php files, pages being entirely generated by javascript