FullVlad's Improvements to Index

This is pull request https://github.com/privly/privly-applications/pull/83 with a few of my changes mixed in.