Updated to use eventemitter2.