More merging from Habib's fork