Generate schedule for offline.
Minor code cleaning...