Added custom primary key naming and tests