Commented some console.log() used to debug