Moves running attribute into listener class
Declares compiler before calling the listeners