Some minor docstring and style changes, removed unused imports.