Minor refactoring arround connection parameters.