Made parseTemplate recursively replace template variables.
Fixed the documentation around the functions to reflect the changes