Merging Brendan and some of Addy's stuff