Refactor find methods to optionally return the id or element