refactorings that will make archived metric processing easier
better format/indent