Added tests (unit and functional), and Travis configuration