Add unification
Handle empty file
Refactoring