Add annotation features, stats output. Fixes to threading