Update planarity.js

tidied up a bit