move page to element function to allow nesting within modules, load classes from template, handle classes and styles before element loop, functional tokenize function