= fixed a lot of mistakes
= using plain int indices instead of IdxPoint
= refactored tests