First working version of the parser