Remove wrong comments.
Implement common functions for Index.
Add Index implementation.
Add tests for Index.