Some structural improvements (work in progress)