Ported last bit of parse()