Refactor attachReadSlot and attachCallGetter