make close buttion work & set proper opening class.