File improvements: setitem and setattr and more unit tests