Move helpers to separate file and modify interface