Modified the way functions register