Fixed many unused warnings.