Some refactoring, some had wrong semantics, adding find as well