Disclosed are compounds of Formula (I) and pharmaceutically acceptable salts thereof, wherein Ring B, A1, A2, R6, w and n1 are defined and described herein; compositions thereof; and methods of use thereof. These compounds are useful for treating a variety of neurological and psychiatric disorders, such as those described herein.