Merge pull request #1765 from ChaoPang/master

Major refactoring of BiobankConnect code