Modified tests to check correct metadata dict updates, modified as_meta to correctly update the metadata dict