second large batch of changes to align with master