Restructure the rules a little bit.

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