Moved functions to inc