Added back agent options and oncomplete property.