update bbxml script and remove unused code