Added Close functionality