Module-ify futures-based functions