fixed memory leaks and removed useless stuff from stringutf8