Fixes, cleanup and peak snapping