Fix logic, typo, formatting and refactor for making all configured frequencies optional.