Removed almost all dependencies to legacy charset classes