Rework adapters to use promises