Thread template cleanup, fixed mail corruption bug in inline PGP key finder