Broke up extract.js

Improving coherency