Added pages task
Added pages
Updated template generation code