The default rpc port was wrong.
Allow '*' as the address argument to getstakedbyaddress to sum for all addresses in the wallet.

Removed some redundant code that I added in the previous commit on this branch.