Further cleanup.
Add support for run commands (work in progress).