Refactor project for easier travis-ci compatibility