more code cleanup

LoadMetadata() now returns a class rather than a crummy string array.