Improved parsing implementation; nearly complete