Rebased onto wallet class and ready for "wtf is this crap" messages ;)
https://github.com/bitcoin/bitcoin/pull/352
Matt