Intermediate commit. Merged in sendResponse and cleaned up some compiler errors.