Page engine improvements

Each commit represents a small improvement on the page engine layer.