Refactoring: the layouts and common styles.