Completely rewrote to allow for customization, and added tests, updated docs.
0.3.0