moving commands out, adding specific logic for registries