There's a site called Distributed Proofreaders (
http://www.pgdp.net/c/) where volunteers clean up books that are in the public domain, and make nice electronic versions. They use something called Guiguts (
http://home.comcast.net/~thundergnat/guiguts.html) for this processing, and it works pretty well. It has widgets that make nice TOCs, among other things, in the html versions. The html seems to convert very happily to epub, once you get it built.
Guiguts is available for free download.