Addressed code review comments.

- This involved combining the addQs and addConnectionData into a singular method (prepareQueryString).
- Also modified addConnectionData to be private amongst the common js file.

#2503