Move some code in AbstractReceipt, factory is now base on a `type` key instead of rebuilding the classname based on the `name` key