Fix error on index checks.
New index field.
Some auxiliary functions.
Fix bounds check.
New function: Gels()