chore refactoring, add travis support