Fix metric routes
Move all client formatting stuff out of core module