The THREAD type was not used everywhere and pthread_t was used instead.
The thread creation function also returned the address of a stack allocated
value which isn't guaranteed to be usable.
Common variables, like databases, timeouts and interval, and functionality was moved to the MONITOR type.
This reduces the redundant functionality of the monitor API's functions like registerServer and setInterval.