Move cmd stuff into standalone package.