Hagel takes helm at Pentagon after bitter fight