Probably not yet complete, but hopefully a step closer to making this package-able for a new release (#256).