Refactor, api not connecting to productive