Refactored `_run*` functions into `commands.py`.