Replaced the linked lists used in search with vectors