Cleaned up code by removing unneccessary console.log statements.