Finished adding logic for metrics declarations.