Porting most recent updates from oss_core 1.6 to 2.0