introduce device detection, trim comments and change echoes