More refactoring and beinging to add a isConected method