Added ways of adding custom functions and resetting functions.