MAINT: clarification of the code, plus more tests