More bug fixes

Seems pretty stable except for a HTML parsing bug which would require a
major overhaul