init code refactorization - global var

Yeah - what I'm saying is move this and the next 5 lines into the top of branch.js. does that make sense?