Removed console.log messages for debug