Cleaning up function operations