multiaccount functionality in wallet and misc changes