Minor correction and cleanup.

Short open tags need trim() for output to avoid an accidental newline to be inserted, messing up the report.