Cheatsheet visibility code refactored.