some cleanup work on the commands