Working algo and tests (slow), added Dot loading