Moved append changes to range_server.c
A few memory leaks
A crash fix for mvapich