Ting materials save workaround v1: Cleaned code.
Ting materials save workaround v1: Generic function created.