Added rescheduling feature, moved some functions to the shared controller to reduce repeating code