index: use default function instead of global extern.
collection: prefix private functions with _.