A compound according to Formula III or IV: wherein: R is H, -R 1, -R 1 -R 2 -R 3, -R 1 -R 3, or -R 2 -R 3; wherein R 1 is aryl, heteroaryl, cycloalkyl, or heterocycloalkyl, and is optionally substituted with R 1'; wherein R 1' is C 1-6 alkyl, hydroxy, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cycloalkyl, heterocycloalkyl, cyano, or C 1-6 haloalkyl; R 2 is -C(=O), -C(=O)O, -C(=O)N(R 2'), -(CH 2) q, or -S(=O) 2; wherein R 2' is H or C 1-6 alkyl; and q is 1, 2, or 3; R 3 is H or R 4; wherein R 4 is C 1-6 alkyl, C 1-6 alkoxy, C 1-6 heteroalkyl, aryl, arylalkyl, alkylaryl, heteroaryl, alkyl heteroaryl, heteroaryl alkyl, cycloalkyl, alkyl cycloalkyl, cycloalkyl alkyl, heterocycloalkyl, alkyl heterocycloalkyl, or heterocycloalkyl alkyl, and is optionally substituted with one or more C 1-6 alkyl, hydroxy, oxo, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cyano, C 1-6 alkylsulfonyl, or C 1-6 haloalkyl; X is CH or N; Y 1 is H or C 1-6 alkyl; Y 2 is Y 2a or Y 2b; wherein Y 2a is H or halogen; and Y 2b is C 1-6 alkyl, optionally substituted with one or more Y 2b'; and Y 2b' is hydroxy, C 1-6 alkoxy, or halogen; each Y 2' is independently Y 2'a or Y 2'b; wherein Y 2'a is halogen; and Y 2'b is C 1-6 alkyl, optionally substituted with one or more Y 2'b'; wherein Y 2'b' is hydroxy, C 1-6 alkoxy, or halogen; n is 0, 1, 2, or 3; Y 3 is H, halogen, or C 1-6 alkyl, wherein C 1-6 alkyl is optionally substituted with one or more substituents selected from the group consisting of hydroxy, C 1-6 alkoxy, amino, and halogen; m is 0 or 1; Y 4 is Y 4a, Y 4b, Y 4c, or Y 4d; wherein Y 4a is H or halogen; Y 4b is C 1-6 alkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 haloalkyl, halogen, hydroxy, amino, cyano, and C 1-6 alkoxy; Y 4c is C 3-7 cycloalkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 alkyl, C 1-6 haloalkyl, halogen, hydroxy, amino, and C 1-6 alkoxy; and Y 4d is amino, optionally substituted with one or more C 1-6 alkyl; or a pharmaceutically acceptable salt thereof. R is H, -R 1, -R 1 -R 2 -R 3, -R 1 -R 3, or -R 2 -R 3; wherein R 1 is aryl, heteroaryl, cycloalkyl, or heterocycloalkyl, and is optionally substituted with R 1'; wherein R 1' is C 1-6 alkyl, hydroxy, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cycloalkyl, heterocycloalkyl, cyano, or C 1-6 haloalkyl; R 2 is -C(=O), -C(=O)O, -C(=O)N(R 2'), -(CH 2) q, or -S(=O) 2; wherein R 2' is H or C 1-6 alkyl; and q is 1, 2, or 3; R 3 is H or R 4; wherein R 4 is C 1-6 alkyl, C 1-6 alkoxy, C 1-6 heteroalkyl, aryl, arylalkyl, alkylaryl, heteroaryl, alkyl heteroaryl, heteroaryl alkyl, cycloalkyl, alkyl cycloalkyl, cycloalkyl alkyl, heterocycloalkyl, alkyl heterocycloalkyl, or heterocycloalkyl alkyl, and is optionally substituted with one or more C 1-6 alkyl, hydroxy, oxo, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cyano, C 1-6 alkylsulfonyl, or C 1-6 haloalkyl; R 1 is aryl, heteroaryl, cycloalkyl, or heterocycloalkyl, and is optionally substituted with R 1'; wherein R 1' is C 1-6 alkyl, hydroxy, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cycloalkyl, heterocycloalkyl, cyano, or C 1-6 haloalkyl; R 2 is -C(=O), -C(=O)O, -C(=O)N(R 2'), -(CH 2) q, or -S(=O) 2; wherein R 2' is H or C 1-6 alkyl; and q is 1, 2, or 3; R 3 is H or R 4; wherein R 4 is C 1-6 alkyl, C 1-6 alkoxy, C 1-6 heteroalkyl, aryl, arylalkyl, alkylaryl, heteroaryl, alkyl heteroaryl, heteroaryl alkyl, cycloalkyl, alkyl cycloalkyl, cycloalkyl alkyl, heterocycloalkyl, alkyl heterocycloalkyl, or heterocycloalkyl alkyl, and is optionally substituted with one or more C 1-6 alkyl, hydroxy, oxo, C 1-6 hydroxyalkyl, C 1-6 alkoxy, halogen, nitro, amino, cyano, C 1-6 alkylsulfonyl, or C 1-6 haloalkyl; X is CH or N; Y 1 is H or C 1-6 alkyl; Y 2 is Y 2a or Y 2b; wherein Y 2a is H or halogen; and Y 2b is C 1-6 alkyl, optionally substituted with one or more Y 2b'; and Y 2b' is hydroxy, C 1-6 alkoxy, or halogen; each Y 2' is independently Y 2'a or Y 2'b; wherein Y 2'a is halogen; and Y 2'b is C 1-6 alkyl, optionally substituted with one or more Y 2'b'; wherein Y 2'b' is hydroxy, C 1-6 alkoxy, or halogen; n is 0, 1, 2, or 3; Y 3 is H, halogen, or C 1-6 alkyl, wherein C 1-6 alkyl is optionally substituted with one or more substituents selected from the group consisting of hydroxy, C 1-6 alkoxy, amino, and halogen; m is 0 or 1; Y 4 is Y 4a, Y 4b, Y 4c, or Y 4d; wherein Y 4a is H or halogen; Y 4b is C 1-6 alkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 haloalkyl, halogen, hydroxy, amino, cyano, and C 1-6 alkoxy; Y 4c is C 3-7 cycloalkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 alkyl, C 1-6 haloalkyl, halogen, hydroxy, amino, and C 1-6 alkoxy; and Y 4d is amino, optionally substituted with one or more C 1-6 alkyl; Y 4a is H or halogen; Y 4b is C 1-6 alkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 haloalkyl, halogen, hydroxy, amino, cyano, and C 1-6 alkoxy; Y 4c is C 3-7 cycloalkyl, optionally substituted with one or more substituents selected from the group consisting of C 1-6 alkyl, C 1-6 haloalkyl, halogen, hydroxy, amino, and C 1-6 alkoxy; and Y 4d is amino, optionally substituted with one or more C 1-6 alkyl;