V2.1 dev stringbuilder

Various refactorings suggested by IntelliJ. Still getting used to github before I start making some useful changes.  I will probably have a few more pulls like this.