Add a travis build script.

Fix #1.
Add a fix script and fix formatting.