Clean up and simplify code

* Stop using deprecated APIs
* lipstick: Clean up subscription code
* Simplify the code in a number of places

  Resolve all TODO items as well

* Clean things up by removing the "switch nonsense"

  Although really, it is just a switch of a different sort. This
  implementation takes the switch statement and encodes it as an Object
  that then is used to select which function to execute based on the key
  name.

* Move the creation of the whitelist to the constructor

  Extracting the switch statement into the function map did allow for one
  additional optimization: creating the whitelist from the keys in the
  function map. This ties together the two things that should be in
  lockstep anyway, simplifying the code and making it more robust at the
  same time.

Closes #4