Re-organize into a package

Part of #11