massive refactoring and added root DoFs