Add connection test + fix class after noticing problems after test