Refactoring and testing display.*, part 1.