Added closeOpenView(). Thanks to @chrisnharvey