Refactor and prepare for notification support

This PR does not add notifications, but preps for it by renaming some functions and vars, fixing comments, and handling how we move data around a little better. This way my notification PR will be cleaner.
Why a ternary for true false? Just cast it to the result of `!empty()`?