Move 'create_metrics' to be rest of metrics code.