Changed ArraySearch and added documentation.