Typo fix. Altered popup code placement. Still needs events for success/failure.