Episcopal Church agrees to halt pro-gay agenda