Refactor KeyAssembler.