Refactoring: some code in paint_crossword() moved into separate methods.