Fix display.
Refactoring and comments.