Changed indexes API, separated header to several files