Parser Implementation and bug fixes