Fixed implementation issue in list.c (rear point was not being changed on item removal). Added write_output function