updates to updateconnectionstring and minor var refactor