Update to v4, major refactoring, better tests
Updated travis