better scheduling logic.
Comments and better interface.