removed some console.log and useless variables.