Add travis test and Refactoring

Closes #22
18 files changed