There are 5 functions, listed here in the order they are executed if all of them exist. If one does not exist, it is simply skipped.