Refactored ntp module