full test coverage
refactored index.js
Merge pull request #1 from EggDice/master

Full test coverage