Factored out the parser into seperate module