improvements

cancellationtokensource to token, save/restore bugfixex, perfomance
improvements