refactoring of client code corresponding to iframe presentation into speaker code