Further groovydoc'ing and slight refactoring