Translate some structure changes from master