refactorings & fixes for bck2brwsr