Disclosed are carboxamide, sulfonamide and amine compounds, as well as pharmaceutical compositions and methods of use. One embodiment is a compound having the structure in which R1, R2, R4, D, E, J, T, p, q and x are as described herein. In certain embodiments, a compound disclosed herein activates the AMPK pathway, and can be used to treat metabolism-related disorders and conditions.