Changed to more event driven architecture