removed some old code and traces
adding classes to identify terminal states