Fix numerous errors
Implement fully working 'search AI'