Fix some template errors
Correct some documentation