Refactor into classes, build VirtualPage functions