Updated tests and __to_dict