Added Delete Functionality

Add other code corrections.