feat(index.js): extract to controllers