Parser

Move parser logic into another module.