Finished schedule ouput. But it needs testing.