Code changes according to Mozilla validation results