Change pubkeybytes to address in test and functions