Debugged editing bd, Lots of other fixes