Simplified code

* Changed one character strings to chars
* Changed one-line do-ends to {}s