Moved the JS Transect code into Transect.js