Heterocyclic compounds containing 8-azabicyclo [3.2.1] octane, 9-azabicyclo [3.3.1] nonane, or 3-oxa-9-azatricyclo [3.3.1.0<2,4>] nonane ring systems