Bug fixes and AliROOT integration