Refactoring of display functions