Optimization: used char instead of string where possible.

As digitalmentat pointed out on reddit.