updates to get BGDA working

not perfect and some loose ends to tidy up - but it's better than before.