Convert commands to use new interface, some cleanup