Refactored the gherkin parsing code and fixed a bug related to sub steps.