Cleanup, set default mode when not passed.