changed back smart pointers to regular pointers to avoid segfault at exit. Also added functions to BBRegionType interface