MinDec additions.

Finally got around to adding the MinDec additions to the project.  Figured I'd use the pull request system since I haven't before on a project.  I usually fork things.

There's a test for the new code but I still need to add it to the demo project.  So the pull is not really complete.  I also have a couple of questions before you accept the pull.