Better concurrency in core

The core now makes use of futures, which seems appropriate.