Note, @pdehaan is right, this should be localized once the function is pushed down into base.js