added metadata container
continued refactor abstracting to metadata