set_run_mode and move enums to their own file

easier to include and use in other bindings