Added cbegin and cend free functions.

cbegin and cend free functions are available in
helpers.h

Fixed bug in index_of
Make use of cbegin and cend where appropriate.