Update ruby to 2.1.1
Abstract modulo calculations to verbose methods

* Nitpick suggested intention revealing code