BSA Update

I am making this pull request to fix both fdo#80106 and Redmine Issue 307. Sorry for the large number of commits but I did this through the Github web interface so could not change multiple files.