Add material/id mapping to keep compatibility with old accessors
Perform some housekeeping, remove deprecated things..