Huge refactorization to solve dependencies mess, on the way to a nice DAG