improved cmdmgr

improved usability and error handling
added almost every API method
I'd print both, the actual error code and the string. After all this is a tool do debug errors and get to learn the api