Fixed a bunch of bugs and added metrics