Added debugging for array.
Made the initialization call optional (you can now pass NULL pointer).