further tweaked testing code, and added more debuging code to scheduler.