Refactor find functions.