More tests
Fix rank calculation in insert/insert!