First commit in refactoring distant supervision