Added new event system to overcome limitations of SDL's events