Fixes to documentation

Some fixes in places like documentation. Remove unused variables and
template