Merged in new GDBB code

Merged in code from Brahmaji.