Disclosed are 6,7-dihydro-4H-thieno[3,4-c]pyran-4-yl)methanamine derivatives and analogues as represented by the general formula (IIIa), or a pharmaceutically acceptable salt or stereoisomer thereof, wherein R1 and R2 are each independently (i) hydrogen, alkyl, alkoxyl, aminoalkyl, alkenyl, alkynyl, cycloalkyl, cycloalkylalkyl, aryl, or aralkyl, each of which is optionally substituted; or (ii) –(CH2)p–R8; or (iii) R1 and R2 together with the nitrogen atom to which they are attached form an optionally substituted heterocyclyl or heteroaryl; R3 and R4 are each independently (i) hydrogen, alkyl, alkoxyl, aminoalkyl, alkenyl, alkynyl, cycloalkyl, cycloalkylalkyl, aryl, or aralkyl, each of which is optionally substituted; or (ii) –(CH2)p–R9; or (iii) R3 and R4 together with the carbon atom to which they are attached form an optionally substituted cycloalkyl or heterocyclyl; or (iv) R3 and R1 together with the atoms to which they are attached form an optionally substituted heterocyclyl, and R4 is (i) or (ii); or (v) R3 and R4 are combined together to form a double bond and together with R1 and/or R2 and the atoms to which they are attached form an optionally substituted heteroaryl; R5 is (i) hydrogen, alkyl, alkoxyl, aminoalkyl, alkenyl, alkynyl, cycloalkyl, cycloalkylalkyl, aryl, or aralkyl, each of which is optionally substituted; or (ii) –(CH2)p–R10; or (iii) R5 and R1 together with the atoms to which they are attached form an optionally substituted heterocyclyl; R6 and R7 are each independently (i) hydrogen, halo, alkyl, alkoxyl, aminoalkyl, alkenyl, alkynyl, cycloalkyl, cycloalkylalkyl, aryl, or aralkyl, each of which is optionally substituted; or (ii) –(CH2)p–R11; or (iii) R6 and R7 together with the atoms to which they are attached form an optionally substituted aryl, heteroaryl, cycloalkyl or heterocyclyl ring; m is 0, 1, or 2; n is 0, 1, or 2; and each occurrence of p is independently 0, 1, or 2; and wherein the remaining substituents are as defined herein. Repre