Split out the connections into their own classes

I removed the case statements and made a separate class for each type.