Added leave scheduling machinery