Headphone cap code changes