Separate out key scheduling.