[WIP] Introduce form orderer

This PR rewrites the algo which orders form childs.