Add documentation, fix bug.