added load_from_dict and load_from_json factories as well as a bunch of unit tests