Improve index API
Source formatting