Configuration via a config struct

This gives us a simple config struct to pass around.