Removed debug console.logs and fixed minor mistake