Replaced async mess with an event driven approach.