Refactored methods in SimpleParser to improve readability