Removed code and fixed warnings.
Fixed crash in search view