Improved CommandSet.getMatch and added more unit test coverage for CommandSet