Found a cleaner way to search through keys, and no longer need to flush the database. WOOT!