Separated from the previous commit for ease of review.
could once be renamed from /src/wallet to /src/legacywallet.