Switch from arrays to Google Closure StringBuffer