feat(index.js): extract models code