Minor cleanup and added a cronjob option