Removing values() method and restoring toArray() method to a non-deprecated state