Remove console.log and some var updates