Make the library a bit more generic
Merge pull request #5 from dcoloma/small-refactor

Make the library a bit more generic