Removed unnecessary code and all the console.logs