Updated testing

Updated code and updated some of the tests. Removed some of the useless tests.
Because they are useless asserts. $pkey will always have a value.