Add fast fragment builder algorithm. Improve timeout implementation