checking validity of passed in encoded pb object
fix a few bugs; add docs to corpus requirement
fixed a bug with misplaced code