All steps for initialization are moved to one init() function. Two new functions: stopTimer() and startTimer() are included to control the timer.
Added support for SIGHUP signal in main.c to reload the configuration file while the daemon is still running.