improved api html outpu (ref: #447)