Added tests and apparently fully implemented indices