Turn is_leaf? into its own method.