Fixed recursive printout, added name field, type is now added with metadata.