Forward-back-ported command stuff from WAY back.