minor changes 

Put some functions from goxapi into util moduls to make goxapi more readible