Use the convenience functions for last items in arrays.
Merge branch 'master' into XCode4