Refactored tests and travis configuration fix