added a bit better command handling

Planning to make it even better some day, still not sure how to
implement that though, or how to do it at all