Added selector parser; start of events logic