Removed console.log statements for debugging.