Move events out of constructor and into events plugin