Moved connection to its own class