Military concedes to some demands from protesters, removes defence minister and vows to restructure intelligence agency.