moving code around
refactoring; prototype watchdog addition