fixes specs to pass again
cleans up index.js to have consistent function declaration
adds LICENSE file
improves specs by introducing spec-helpter.js