meged in bens branch
updated snippet with snippet factory
added a bunch of tests