minor doc cleanup and fixed fns