Updating how commands are executed.
Updated tests.
Added return code.