Update to objects to allow them to write themselves out.
Small bugfix to Light module