Revert "Move mod calculations to a separate helper"

This reverts commit e3718e5d518651ed63f4f141069dff2bada4b302.
Add a travis.yml to test a build.
Use new fancy build on both linux and osx thing.