Accumulated work on libcmd.