Issue#42

Replaced the classic if-else with reflection to parse commands