First draft of parser