feat: parser improvements and refactor