ntpd-fix + refactoring