Miscellaneous groveler fixes and small improvements

These commits can be broken up into separate pull requests if that is more convenient.

These are various small fixes and improvements to the groveler which I believe to be beneficial. The commit messages should be fairly explanatory, but I am happy to give more detail if the rationale or use-cases aren't clear.