Removed dependency. Added close method.