Rename delete_field function and added check for preview and 404 mode for horizon