Refactoring metrics to use directives
Refactored metrics to initialize graphs through directives