improved Page class, added comments