Split sampler into sampler+parser
Move parser,sampler guts into cpp files