Move core functionality into a separate module.
Add mocha testing framework and initial tests. Closes #5
Add Travis CI. Closes #4