Trim index.js, improve modularity and tests