Fixed wrong index.
Introduced Triple abstraction.