Refactor the way adapters are instanciated