documents some more public methods. Also improved code quality a little