Add optional index param to category functions, export them