Fully functional as an application
Reworked to function as a daemon