fixed encoding problem and added more string cleaning
semantic changes, sleeping requests, re and encoding changes