Split send.js into compile.js and send.js

This is a minor change. Split send.js into send.js and compile.js, so that compile.js can be split into its own module in the future.