Discovery of novel Tetrahydrobenzo[b]thiophene and pyrrole based scaffolds as potent and selective CB2 receptor ligands: The structural elements controlling binding affinity, selectivity and functionality.