code set factory and controller proeprly hooked up also trimmed some unnecessary code from datacollector factory