Created apimod and moved couple functions