Import and export the gloss layer.
Improved and unified the material layer handling.

- Material layers get now added at export time if they are missing.
- Reduced the amount of code