Refactor puller to activerecord