Types and fix some RC_MAIN in Schedule

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>