The snap function is now working and I did add some comment to my code. Looks much better now that it is clear. I might have commented to much but better with too much than not enough. I decided to add my code here so if anyone wonders how it is done they can take a look. As well as I will see the changes along the way when I post my work.