Added the option to schedule an event from the edit window if it is not already
misc JS clean up