Sorts out to_html() and str(), fixes a handful of bugs, implements simple logger

Closes #31, closes #30, closes #29, closes #21