[LFC][Quirk] Move quirk functions to dedicated classes.