Clean up the code a bit, add support for travis