Modified parser for input frame to deal with separate valid bit. Belongs to #35.