On finding a cofounders agreement template, I have been searching for a great template also. I did run into this::
http://www.slicingpie.com/ is a website and a book, and there is a calculator for dividing up equity. The author Mike Moyer is working to come up with a very democratic way of dividing up the company, and deal with all of the different situations that can arise.
I have not used it so I can't speak to the pros and cons and I have heard to be cautions because it is new and not yet well accepted by the startup community. But at least it is educational and Mike Moyer is a very passionate presenter. And it's all very logical.