Cleans nil elements
Allows to use version control diff