Factoring out ResetAllShape to be used elsewhere