renders pages using templates
cleans up pixel sending