Created classes for connection, IO and logic.