cleanup, and fix the args to pass to backends