Cleaned up the close method some more.