Switched to promises instead of synchronous streams