First version of a library indexer script. Fixed some rspec cases which were failing.