Fixed encoding problems, added URL detection