Fixed mechanism to execute commands.
Added test files.