#143 Get rid of setTimeout and use events instead