adds templates documentation, corrects some typos in API documentation