Cleaned up display function.