Fixed several issues and added in a spec for saving records with no primary keys.