Added page class, added some const-modifiers to record, added minor tests to main.