Large code clean-up
Change how events are returned

This to accommodate coming functionality to skip objects
and arrays.
Clarify comment regarding certain states and whitespace