Fix requesting samples.
Fix tests for switching on and off.
Enable Travis CI builds.