Merge pull request #177 from raistlinthewiz/develop

Misc refactoring
Merge pull request #178 from raistlinthewiz/develop

more refactoring
It's now correctly determined if a share is a block candicate.