I'm migrating the code to a class, so that I can better separate the programme logic from the process management logic. This will let me daemonise the code a bit better and "cleaner".