Added instruction repository and refactored common repository logic into base class.