Block preparing fixes

Guarded against infinite looping on failed prepareBlock functions.
Added evaluateBlock function to make sure blocks conform to standards.
Added extra logic to prevent “chaining” of targets causing incorrect
blocks