Extended build structure refactoring from d8b57e5