A huge lot of plugin functionality and tests to back it up.
Utility method and tests.