Implemented most of the cli commands