Updated/Refactored Previous Search Feature