Minor refactoring and docstring update.