Refactored the open and close methods a little bit