Extensive changes to typing
Added comments
Added type safe alternative to objectsForEvent