simplify details formatting, improve html formatting