Refactor nilearn.plotting.glass_brain to use functions