Move Settings and related entities to separate class. Also expand Connection class.