Make connection class more general. Finish the setup connection part.