partial wchar support + cleaning