Cleaned up char parsing