Revised to new interface/structure.