A compound of Formula I: wherein: X is N or CH; A 1 is phenylene optionally substituted by halo, -C 1-3 aliphatic, or -OC 1-3 aliphatic, either of which is optionally substituted by one or more halo or -OCF 3; A 3 is a 5-membered heteroaryl ring selected from pyrazolyl, triazolyl and pyrrolyl; L 2 is -O- or a bond; L 3 is C 2-4 aliphatic optionally substituted by one or more C 1-6 aliphatic or C 3-6 carbocyclic; L 4 is -CH 2 - or -CH 2 CH 2 -; Q 1 to Q 3 are independently N or CR 2; Q 4 is CR 3; R a and R b are independently H or C 1-3 aliphatic; R 1 is selected from H, halo, -CN, C 1-3 aliphatic (optionally substituted by 1 to 3 halo), C 3-6 carbocyclic, -NO 2, -N(C 0-3 aliphatic) 2, -SO 0-2 (C 1-3 aliphatic), -C O(C 1-3 aliphatic), -C C 0-3 aliphatic, or -C N(C 0-3 aliphatic) 2; each R 2 is independently H, halo, -OC 1-3 aliphatic, or -C 1-3 aliphatic; wherein R 2 and R 3 are optionally taken together to define an optionally substituted 5-6 cyclic fused at Q 1 and Q 4 to Ring A 2 and containing one or more heteroatoms; R 3 is selected from halo, -OR 12, R 12, 3-6 cyclic, -NR 10 R 11, -NR 10 SO 2 R 13, -OSO 2 (R 13), - SO 2 (R 13), -SO 2 CF 3, -SO 2 NR 10 R 11, -C NR 10 R 11, -C R 12, -C O(R 12), -C (R 12)-O(R 12), - C CF 3, -C ( 3-6 cyclic), or -C O( 3-6 cyclic); wherein any of the foregoing is optionally substituted with one or more, halo, -OH, -CF 3, -NO 2, -CN, -C 1 - 6 aliphatic, -OC 1 - 6 aliphatic, - C=N-OH, -C=N-OR 12, -NR 10 R 11, -SR 13, -SOR 13, -SO 2 R 13, -CO 2 R 12, -CONR 10 R 11, - SO 2 NR 10 R 11, -NHCOR 12, -NR 10 CONR 10 R 11, -NR 10 SO 2 R 13, or -P (OR 10) 2; R 4 is OH, C 1-4 aliphatic, or -OC 1-3 aliphatic; R 10, R 11, R 12, and R 13 are independently H, C 1-6 aliphatic, or C 3-6 carbocyclic, or R 10 and R 11 attached to the same atom can be taken together with the atoms to which they are attached to form a ring containing one or more heteroatoms, or a pharmaceutically acceptable salt thereof. X is N or CH; A 1 is phenylene optionally substituted by halo, -C 1-3 aliphatic, or -OC 1-3 aliphatic, either of which is optionally substituted by one or more halo or -OCF 3; A 3 is a 5-membered heteroaryl ring selected from pyrazolyl, triazolyl and pyrrolyl; L 2 is -O- or a bond; L 3 is C 2-4 aliphatic optionally substituted by one or more C 1-6 aliphatic or C 3-6 carbocyclic; L 4 is -CH 2 - or -CH 2 CH 2 -; Q 1 to Q 3 are independently N or CR 2; Q 4 is CR 3; R a and R b are independently H or C 1-3 aliphatic; R 1 is selected from H, halo, -CN, C 1-3 aliphatic (optionally substituted by 1 to 3 halo), C 3-6 carbocyclic, -NO 2, -N(C 0-3 aliphatic) 2, -SO 0-2 (C 1-3 aliphatic), -C O(C 1-3 aliphatic), -C C 0-3 aliphatic, or -C N(C 0-3 aliphatic) 2; each R 2 is independently H, halo, -OC 1-3 aliphatic, or -C 1-3 aliphatic; wherein R 2 and R 3 are optionally taken together to define an optionally substituted 5-6 cyclic fused at Q 1 and Q 4 to Ring A 2 and containing one or more heteroatoms; R 3 is selected from halo, -OR 12, R 12, 3-6 cyclic, -NR 10 R 11, -NR 10 SO 2 R 13, -OSO 2 (R 13), - SO 2 (R 13), -SO 2 CF 3, -SO 2 NR 10 R 11, -C NR 10 R 11, -C R 12, -C O(R 12), -C (R 12)-O(R 12), - C CF 3, -C ( 3-6 cyclic), or -C O( 3-6 cyclic); wherein any of the foregoing is optionally substituted with one or more, halo, -OH, -CF 3, -NO 2, -CN, -C 1 - 6 aliphatic, -OC 1 - 6 aliphatic, - C=N-OH, -C=N-OR 12, -NR 10 R 11, -SR 13, -SOR 13, -SO 2 R 13, -CO 2 R 12, -CONR 10 R 11, - SO 2 NR 10 R 11, -NHCOR 12, -NR 10 CONR 10 R 11, -NR 10 SO 2 R 13, or -P (OR 10) 2; R 4 is OH, C 1-4 aliphatic, or -OC 1-3 aliphatic; R 10, R 11, R 12, and R 13 are independently H, C 1-6 aliphatic, or C 3-6 carbocyclic, or R 10 and R 11 attached to the same atom can be taken together with the atoms to which they are attached to form a ring containing one or more heteroatoms, or a pharmaceutically acceptable salt thereof.