Close button refactor