Refactored the display process