Added tests for a suspected bug that turned out not to be a bug after all. Also cleaned up some things.
Cleaned up some stuff and made the gem conform better to best practices.