Extract page renderign to separate file.