TODO: Change metadata to HashMaps?