Remove functions now free memory if necessary