Merge pull request #25 from noahcampbell/master

Internal API changes and introduce testing.