Rebased from Dev 2.x