Merge pull request #190 from mithro/pr-fixes

Updates to the primitive libraries.