Repair regressions

Fixes regressions introduced when fixing #23 and #25.

Also added a travis config, but that is still in progress.