Fixes some error messages relating to removing the uploaded shapefile layer and removes unneeded code.