Add indices to the db
Fix point ordering