Order snap node distance
Snap closest first
Removed redundant code
Merge pull request #554 from cocojoe/develop

Order snap node distance Issue #547