Reworked into a gem

This is currently untested. I need to do some work over the next few
days to rectify that. This commit is just to get the repo & gem created.