Added more tests and changed existing command handler

Issue #1