Added reappend-on-drop test, cleaned up test code