Fix parameter types which were actually variable names implicitly defined as any
Reimplement earlier changes to header