Schedule refactor (saving state does not work yet)