Refactored some WeaverUtil convenience functions. Added more tests.

All 234 tests pass, with 99% coverage.