removing extra spaces
removing console.log
remove unused variables
removed global functions and made some formatting changes
formatting