Add lastIndexOf and add more tests