Connection working properly (still a few bugs)