Continuing refactor or metric_handler - made splitting out into classes work.
Split metric_handler out into classes in separate files.