Almost working, but needs housekeeping timer.
Working script wit bugs fixed.
Made validation for dates. Housekeeping script still in place.