Cleaned-up metric class.