More progress.
Added StringBuilder
Moved to a strategy of creating connections to db when it is needed