Added more abstraction to the parser