Refactor and added MetaData