Topic/termination

Implement improved termination reasoning