Added .close() function. Adds #1