Added more template functions. Update docs.