Restructure how parser works.