Bug fixes. New field that Ted added. Added database indices.