Some leaf decay code

Added some of the leaf decay code, but not all of it.