bug fixes, improved messaging, code cleanup, new messaging signal

I found a couple of issues with hx, most notably, it didn't work with WSGI_APPLICATION settings like "project.wsgi.application" which is the default.

Also, refactored messaging a bit.