Update to new metrics api
Rewrite to use polymern and components