refactorings and simplifications, also changed the internal watchdog to check a lot more frequently to track down a bug