bug fixes and first draft of block evaluator