Improving Performance And Endurance For Crossbar Resistive Memory