Expose .end() function