Fix bad comparison
Fix for automtests
Check termination conditions
Clean debug messages.
Clean log services.
Add alarm for wallclocktime.