The invention provides compounds of general formulae (I)-(IV) or pharmaceutically acceptable salts thereof:The invention also provides methods of preparing the compounds, pharmaceutical compositions comprising the compounds and use of the compounds for the preparation of medicaments intended to modulate the activity of one or more members of the G-protein coupled receptor (GPCR) class. Compounds of the invention may be used to create a compound library for use in screening for agents which modulate signalling through GPCRs.