Fixed 'most glaring' bugs with parser