A compound of Formula: or a stereoisomer thereof, or a pharmaceutically acceptable salt thereof, wherein: Q is selected from C and N; R 1, R 2, R 3, and R 4, which may be the same or different, are each selected from hydrogen, halogen, alkyl, alkenyl, cycloalkyl, aryl, heterocyclyl, heteroaryl, alkynyl, -CN, -NR 6 R 7, -OR 6,-COR 6, -CO 2 R 6, -CONR 6 R 7, -C(=NR 6)NR 7 R 8, -NR 6 COR 7, -NR 6 CONR 7 R 8, -NR 6 CO 2 R 7, -SO 2 R 6, -NR 6 SO 2 NR 7 R 8, -NR 6 SO 2 R 7, and -NR 6 SO 2 aryl, wherein the alkyl, alkenyl, alkynyl, cycloalkyl, heteroaryl, aryl, and heterocyclyl are independently optionally substituted with at least one substituent R 9, or (R 1 and R 2), and /or (R 3 and R 4), together with the ring to which they are attached, form a fused ring selected from heterocyclyl and heteroaryl rings optionally substituted with at least one substituent R 9; provided that R 1 is absent when Q is N; R 5 is selected from alkyl, cycloalkyl, heterocyclyl, aryl, heteroaryl rings, each of which is optionally substituted with at least one substituent R 9; R 6, R 7 and R 8, which may be the same or different, are each selected from H, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, and heteroaryl; or (R 6 and R 7), and /or (R 7 and R 8) together with the atom(s) to which they are attached, each form a ring selected from heterocyclyl and heteroaryl rings optionally substituted with at least one substituent R 9; R 9 is selected from halogen, haloalkyl, alkyl, alkenyl, cycloalkyl, aryl, heteroaryl, heterocyclyl, alkynyl, oxo, -alkyl-NR'R", -CN, -OR', -NR'R", -COR', -CO 2 R', -CONR'R",-C(=NR')NR"R"', nitro, -NR'COR", -NR'CONR'R", -NR'CO 2 R", -SO 2 R, -SO 2 aryl,-NR'SO 2 NR"R'", NR'SO 2 R", and -NR'SO 2 aryl, wherein the cycloalkyl, aryl, heteroaryl, or heterocyclyl group are each independently optionally substituented by one, two or three substituents selected from halo, alkyl and haloalkyl, wherein R', R", and R'" are independently selected from H, haloalkyl, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, and heteroaryl, or (R' and R"), and /or (R" and R'") together with the atoms to which they are attached, form a ring selected from heterocyclyl optionally substituted by halogen and alkyl, and heteroaryl rings optionally substituted by halogen and alkyl. Q is selected from C and N; R 1, R 2, R 3, and R 4, which may be the same or different, are each selected from hydrogen, halogen, alkyl, alkenyl, cycloalkyl, aryl, heterocyclyl, heteroaryl, alkynyl, -CN, -NR 6 R 7, -OR 6,-COR 6, -CO 2 R 6, -CONR 6 R 7, -C(=NR 6)NR 7 R 8, -NR 6 COR 7, -NR 6 CONR 7 R 8, -NR 6 CO 2 R 7, -SO 2 R 6, -NR 6 SO 2 NR 7 R 8, -NR 6 SO 2 R 7, and -NR 6 SO 2 aryl, wherein the alkyl, alkenyl, alkynyl, cycloalkyl, heteroaryl, aryl, and heterocyclyl are independently optionally substituted with at least one substituent R 9, or (R 1 and R 2), and /or (R 3 and R 4), together with the ring to which they are attached, form a fused ring selected from heterocyclyl and heteroaryl rings optionally substituted with at least one substituent R 9; provided that R 1 is absent when Q is N; R 5 is selected from alkyl, cycloalkyl, heterocyclyl, aryl, heteroaryl rings, each of which is optionally substituted with at least one substituent R 9; R 6, R 7 and R 8, which may be the same or different, are each selected from H, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, and heteroaryl; or (R 6 and R 7), and /or (R 7 and R 8) together with the atom(s) to which they are attached, each form a ring selected from heterocyclyl and heteroaryl rings optionally substituted with at least one substituent R 9; R 9 is selected from halogen, haloalkyl, alkyl, alkenyl, cycloalkyl, aryl, heteroaryl, heterocyclyl, alkynyl, oxo, -alkyl-NR'R", -CN, -OR', -NR'R", -COR', -CO 2 R', -CONR'R",-C(=NR')NR"R"', nitro, -NR'COR", -NR'CONR'R", -NR'CO 2 R", -SO 2 R, -SO 2 aryl,-NR'SO 2 NR"R'", NR'SO 2 R", and -NR'SO 2 aryl, wherein the cycloalkyl, aryl, heteroaryl, or heterocyclyl group are each independently optionally substituented by one, two or three substituents selected from halo, alkyl and haloalkyl, wherein R', R", and R'" are independently selected from H, haloalkyl, alkyl, alkenyl, alkynyl, cycloalkyl, heterocyclyl, aryl, and heteroaryl, or (R' and R"), and /or (R" and R'") together with the atoms to which they are attached, form a ring selected from heterocyclyl optionally substituted by halogen and alkyl, and heteroaryl rings optionally substituted by halogen and alkyl.