Move page create code to utils