Refactor all code. Move go metrics wrapper in one place