Changed parser

We don't need to keep static functions in a class, let's use namespace for
this