Fixed some variable names for consistency and fixed some bugs in debug logging.
Merge branch 'master' of https://github.com/aaron235/messageworks