Move helper to separate file and modify interface