Optimized process_char

additional cleaning