Refactor of connect functions because they were totally wrong, added a hastable to store spotted devices but no connected yet.