Refactoring to clean things up a little. Functionally equivalent, so no version bump.
Refactored using Lil.js to cut down on code. Adding Lil.js to repo.