Added nspointerarray additions from unstable branch