trying to merge Nolan #111 and Camille's #121

But please check it ... I might have messed it up - I got lost at some stage...
@jbpoline - looks like some merge markers are still in the files.