cleanup obsolete files
pulling out send json/html for reuse