Add realtime stats. Fixes #63 and #88