More page allocation code WIP