fix the doubly linked list bug

change removeContent into a wrapper function. checking other reference
bugs