Snap distance and some tweaking