Decided to rewrite CTR code from scratch.