queue data structure
renamed external events to signals, added global event queue