Minor refactoring in delete function
Minor refactoring in delete function


Former-commit-id: e8b2e24ec01c664083f2deb181c05a93087742d1
ranxian/peloton,omegaga/peloton,ranxian/peloton,omegaga/peloton,larryxiao/peloton-1,larryxiao/peloton-1,ranxian/peloton,omegaga/peloton,omegaga/peloton,larryxiao/peloton,ranxian/peloton,ranxian/peloton,larryxiao/peloton-1,larryxiao/peloton,amaliujia/CMUDB-peloton,omegaga/peloton,amaliujia/CMUDB-peloton,larryxiao/peloton,ranxian/peloton,amaliujia/CMUDB-peloton,omegaga/peloton,larryxiao/peloton,omegaga/peloton,larryxiao/peloton-1,larryxiao/peloton,larryxiao/peloton-1,larryxiao/peloton,amaliujia/CMUDB-peloton,larryxiao/peloton,amaliujia/CMUDB-peloton,larryxiao/peloton-1,amaliujia/CMUDB-peloton,larryxiao/peloton-1,amaliujia/CMUDB-peloton