fixes to the snippet class, still a lot more to do