a little cleanup in the codeaddress function