Added templates helper functions and made element.source() point to the actual file it came from and not the file's base path