Add missing borrows
Add tests