Refactor flowtils and add in command_hook. Test that setup/teardown
methods are called and flowfile functionality works as expected. Fixes