Dictionary implementation of switch-case for commands