Fixes, tests and travis