Updated docstrings, fixed return values.