Data transmission fixed and tests expanded.