Merging in changes from Dave