Clean up and extraction of execution to a plugin.