Split into package

Here's the PR for #101