Fixed some bugs. First version of ArrayRef.