Factor some things into variables so tube/buses can share JS file.