Add general request type with headers, small code cleanups.