Make frequency unit an instance attribute and not a class attribute (likely to cause crashes).