Added modified controller class for implementing MidiModule thread functionality -Felix