Fixed typo in code and made coding style more consistent.
Fixed sub-array checking.
Bumped up version number.