Bunch more clean up. Added logging (which of course doesn't go anywhere yet).
Forgot to add the scheduler, might be necessary