Finished cleaning ChainManager.

Doesn’t save anything, more robust and comments added. Also fixed
gathering traces around head position.