Print to webview works.

Did a little refactoring/ reformatting. Make printing to webview work,
and put a check in for the bluetooth subsystem being alive. (Note:
Printing to the webview can require calling a method from a different
thread. This is deprecated, and might go away. I'll investigate later.)
Merge pull request #17 from wepu/master

refactoring. I'm just going to assume this all works.