make the materials database a mondule with classes