[#42] Refactor & clean up

* Avoid unnecessary local variables
* Pre-load column positions before looping
* Use StringBuilder instead of StringBuffer