renamed methods in PageManager and added PageManager.popToClasses(), and
removed unnecessary methods.