Adding closeOpenView method