Bug 859372 - Refactor transport.js; r=past