Added action/emote handling, output is now stripped of unwanted bytes.