Move parser into lib directory