did some refactoring and some cleanup. took ownership of metrics annotations since they have some shortcomings