Added docstring, unit caching.