Adds travis-ci support and some fixes.