Updated registerCommandTranslator and registerCommandBus by replacing closure