Refactoring

Implemented new metrics
Implemented new model to publish metrics