Fixed bug causing cronjob to not register in wordpress.
Moved cron function to stand-alone function call, updated relating register and unregister calls.