started refactoring image search