Revamp

Contains code by @v0dro https://github.com/SciRuby/statsample-glm/pull/2