Added Trace function, console.log will now only work if you set debug to true in main.js. Currently false, for production,