Add logic for managing commands

Yep, you are right ... some of them are left over