Move DEBUG definition out of global scope in lib/model.js