Added a default polling interval for metrics of 5s
Code cleanup
Fixed failing assertion in tests