Basic unit tests and CI

Adds basic unit tests (some of them still need to be expanded) and configuration for Travis-CI.