Refactored: model created. Search added with errors