PCT-808: cleanup in cmd package, export errors
PCT-808: more cleanups