Turned the main functionality into a class, and set it up to loop indefinitely until killed.