Updated the searches to look through hashes and used detect instead of find beacuse its way faster.