Added sync interface for raw and device access, fixed up tests.