Added delete post function and test code.