Reorders functions based on functionality