Overhaul html rendering (again)