Raised exceptions for all of the commands and fixed some bugs