update types for dispatch and modules, and add header guards for request.h