Cleaned up syntax of functions used with command monad.