Updated index.js to remove a deprecated call and filled in all the tests. Except arrays