Formatting and removing console.logs