Changed docstrings to numpydoc format and rst style corrections