Moving functions to custom.