Bringin in changes from ptwin dev.