Page controller

Changes according to http://youtrack.jetbrains.com/issue/TW-35486