updated block processing
updated block validation
Merge pull request #3 from wanderer/master

Pull upstream changes