Remove empty lines after expansion
Refactoring