Almost finished replacing pointers with Array class code