Throw Errors instead of strings.
Add 'grunt test' task.
Fix a couple of JSLint issues.
Merge pull request #2 from panuhorsmalahti/split-commits

Throw Errors. Add 'grunt test'. Fix JSLint issues.