Improved index storage & loading efficiency. Added some documentation.