Fixed the metric preview, among many other smaller changes.