Code refactoring.
Resolved conflicts.