More work on fertilizer, now with cleanup and valid file export after cleanup event