background task. WIP. blocks on exit.
cleanup
fix tests.