Update inject and move pieces out into functions file