Refactored EarleyParser a bit