Added a CLI version and switched the main process to a demon.