Cleaner version of the frame configuration detection.