Class labels with definitions working - needs refactoring