Refactored the code to set it up in CI environment provided by travis