Move more stuff out of wallet_model

See commits for actual work done.