Changed popup API a little