Persist hourly plans. Fix next calculation. Remove some dead code and insert hourly plans where required.