Refactored reading CQT data code