Refactor according to the changes in the gol api