small style fixes and docstring