Merge pull request #42 from fibn144/master

Made Mine a generator, other small fixes.
miner is now a generator, don't call items() method.
Merge branch 'master', remote-tracking branch 'upstream/master'