made some minor changes to SNAP to make is more memory efficient, and
made it easier to update its variables.