Reorganised functions, deleting functions.R