Moved code into drone.js.