Cleanup for submission