Made the main script a daemon