cleaned up tooFarToSwap method
more refactoring.
Merge branch 'master' into gh-pages
publishing for testing in pjs.