Replacing more console.logs