Organise code and add Travis CI config