removed unnecessary calls String.{trim,toString}

fixed typo in variable name
added metric on average message size