Cleans up `index` module.
Adds documentation and re-organises the module.