Added DTMetadata class for cleaner code
scala style fix