Adding tests for secondary keys.
Fixing conflicts in merged.