Beginning moving connection code into singleton class