Changing code up a bit to favor events instead of callbacks.