Refactor: Move the metrics to its own package.