Fix various browser bugs (closes #30)