Adding an index to the SQLite DB

Speeding things up considerably! Kudos to @gudmundur :)