use a TMVar instead of a message queue (again)

also fix persistence.
drastically simplify types