Rewrote ugly code and watchdog
Added model method