Refactored Close() and Open()

Close() and Open() didn't do much.