Improved hiding and showing of functions