Refactored iRep class