add HTML, use RPC, + cleanup

Note that this pull request includes and presumably obsoletes #7 on this repository.

Adds @slfritchie's HTMLization code, and changed the behavior of the application such that it expects to be called remotely, rather than from inside the application.