Massive code cleanup, remove Metrics.