Code clean up for b5