Move flatten-restore to separate module
Equality override for ElementWrapper and Note
CLI frontend