Split up logic into location and operator class