code refactoring, added travis configuration, test refactoring