big refactor. hdp => Main, Sampler
update tests after refactor